package org.ailoli.aixiang.widgets

import android.content.Context
import android.util.AttributeSet
import android.widget.GridView

class AxGridView(context: Context?, attrs: AttributeSet?) :
    GridView(context, attrs) {

    private var heightMeasureSpec = 0
    private var widthMeasureSpec = 0

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        this.heightMeasureSpec = heightMeasureSpec
        this.widthMeasureSpec = widthMeasureSpec
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
    }

    public fun getWidthMeasureSpec () : Int {
        return this.widthMeasureSpec
    }

    public fun getHeightMeasureSpec () : Int {
        return this.heightMeasureSpec
    }

}